package cn.heyige.backend.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("admin")
public class AdminDO {
    
    @TableId(type = IdType.AUTO)
    private Integer id;
    
    @TableField("username")
    private String username;

    @TableField("nickname")
    private String nickname;

    @TableField("email")
    private String email;
    
    @TableField("phone")
    private String phone;
    
    @TableField("password")
    @JsonIgnore
    private String password;
    
    @TableField("avatar")
    private String avatar;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

}